import { defineComponent, ref } from 'vue'

export default defineComponent({
  props: {
    tableData: Object, // 确保类型匹配
  },
  setup(props, context) {
    const divStyle = {
      color:'#00000099',
      fontSize:'14px',
      paddingLeft:'12px',
      flex:1
    }
    return () => (
      <el-pagination
        // background
        v-model:current-page={props.tableData.pager.pageIndex}
        v-model:page-size={props.tableData.pager.pageSize}
        page-sizes={props.tableData.pager.pagerLang || [10, 20, 50, 100]}
        // small="small"
        //  layout="total, sizes, prev, pager, next, jumper"
        layout="slot, sizes, prev, pager, next,jumper"
        onSizeChange={props.tableData.pager.sizeChange}
        onCurrentChange={props.tableData.pager.pageIndexChange}
        total={props.tableData.pager.total}
      >
        <div style={divStyle} key="1">共{props.tableData.pager.total}项数据</div>
      </el-pagination>
    )
  },
})
